var Player = {
	new:function(){
		var player = $.extend(true,{},Player.template);
		// add draw properties
		player = Dimension.addDimension(player);
		// add properties
		player = Physics.addNeutonian(player);

		// add forward component
		player = Dimension.addComponent(player,15,20);
		// add backward component
		player = Dimension.addComponent(player,-15,20);
		// add left component
		player = Dimension.addComponent(player,15,-20);
		// add right component
		player = Dimension.addComponent(player,-15,-20);
		
		// add to game loop
		player.id = Game.getID();
		Game.actors[player.id] = player;
		return Game.actors[player.id];
	},
	template:{
		color:"#00A",		
		width:60,			height:70,
		vMax:10,			vMin:0,
		accel:.01,			decel:.01,
		angleAccel:.01,		angleAccelMax:3,
		shoot:function(){
			if(Game.frame % 2 != 0){return;}
			var bullet = Bullet.new(this.id);
			var hardpoint = this.getHardpoint();
			bullet.x = hardpoint.x;
			bullet.y = hardpoint.y;
			var rand = (Math.floor(Math.random() * 40) / 10) - 1; // between -1 and 1 to randomize trajectory
			bullet.a = this.a + rand;
			bullet.v = 6;
		},
		components:{}
	}
};